{% load BadrFilters %}
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>Badr administration</title>
		<link rel="stylesheet" href="{{ STATIC_URL }}admin/admin.css" type="text/css"/>
	</head>
	<body>
	<div class="main">
		<div class="header"><div style="margin: 0 15px;width:auto;">administration&nbsp;<span class="badr">&lt;Badr;/&gt;</span></div></div>
		<div class="page_bread_crumb">
			&nbsp;&nbsp;&nbsp;admin > {{ modelName }}
		</div>
		<div class="models">
    		<div style="margin: 0 15px;width:auto;">
	    		<div class="models_title">
	        		<span>{{ modelName }}&nbsp;entries:</span><div style="float:right;"><input type="button" class="top-margin10" value="Add ..."/></div>
	    		</div>
				{% @sqmlfksk %}
				{% if not modelsPage.IsEmpty %}
					{% include "admin/paging.html" %}
					<table class="models_table" cellspacing="0" cellpadding="0">
						<tr class="tr_header">
						{% for model in modelsPage.Models %}
							{% if for.counter = 0 %}
								{% for field in model.Fields %}<th style="{% if for.counter = 0 %}border-left: 1px solid #b0c880;{% endif %}">{{ field.Name }}</th>{% endfor %}
							{% endif %}
						{% endfor %}
						</tr>
						{% for model in modelsPage.Models %}
						<tr style="background-color: {% if for.counter|Even %}#fff{% else %}#fcfcfc{% endif %};">
							{% for fieldValue in model %}
							{% if for.counter = 0 %}
							<td><a href="{% url "model_details_url" modelName model_id=model.PK %}">{{ fieldValue }}</a></td>
							{% else %}
							<td style="border-left: none;">{{ fieldValue }}</td>
							{% endif %}
							{% endfor %}
						</tr>
						{% endfor %}
					</table>
					{% include "admin/paging.html" %}
				{% endif %}
			</div>
		</div>
	</div>
	</body>
</html>
